﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commerce.Base.Ubl.DataType
{
    /// <summary>
    /// A particular point in the progression of time together with the relevant supplementary information.
    /// </summary>
    public class DateTime
    {
        private System.DateTime value;

        /// <summary>
        /// The date/time value.
        /// </summary>
        public System.DateTime Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
        
        public DateTime(System.DateTime value)
        {
            this.value = value;
        }

        public override string ToString()
        {
            return this.Value.ToString("s");
        }

        public static implicit operator DateTime(System.DateTime value)
        {
            return new DateTime(value);
        }

        public static implicit operator System.DateTime(DateTime dateTime)
        {
            return dateTime.value;
        }
    }
}
